package com.iot08.api.controller;

import com.iot08.api.controller.base.BaseController;
import com.iot08.api.service.PayOrderInfoService;
import com.iot08.api.vo.request.PayOrderInfoQueryReqVo;
import com.iot08.common.utils.response.ResponseMap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.text.ParseException;

/**
 * @author cwj
 * @description 支付订单
 * @date 2025/3/29 14:08
 **/
@Slf4j
@RestController
@RequestMapping("getway/payOrder")
public class PayOrderInfoController extends BaseController {

    @Resource
    private PayOrderInfoService payOrderInfoService;

    /**
     * @description 查询用户的购买服务
     * @author cwj
     * @param [vo]
     * @return com.iot08.common.utils.response.ResponseMap
     * @date @time 2025/4/24 14:35
     **/
    @GetMapping("/query")
    public ResponseMap queryPayOrderInfo(@Validated PayOrderInfoQueryReqVo vo) throws ParseException {
        return payOrderInfoService.queryPayOrderInfo(vo);
    }
}
